<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        input {
            display: none;
        }


        /* checked 选中以后样式才会生效 */
        input:checked {
            width: 20px;
            height: 20px;

        }

        label {
            width: 30px;
            height: 30px;
            border: 1px solid #000;
            display: inline-block;
        }

        input:checked+label {
            border-color: red;
        }
    </style>
</head>

<body>
    <input type="radio" name="s1" id="a">
    <label for="a"></label>

    <input type="radio" name="s1" id="b">
    <label for="b"></label>
</body>

</html>